package com.molichuxing.gateway.bff.user.entity.response;

import com.molichuxing.framework.dto.ResponseRootDto;
import com.molichuxing.services.property.UserSexEnum;
import com.molichuxing.services.property.VerifyResultEnum;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 
 * @author liyg
 * 2019-08-13
 * 身份证vo
 * 
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class IdentityCardVo extends ResponseRootDto {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@ApiModelProperty(value = "用户id")
    private Integer userId;

	@ApiModelProperty(value = "姓名")
    private String name;

	@ApiModelProperty(value = "性别 (1:男, 0：女)")
    private Integer sex;

	@ApiModelProperty(value = "性别 Str")
    private String sexStr;
    
	@ApiModelProperty(value = "出生年月")
    private String birthDate;

	@ApiModelProperty(value = "身份证号")
    private String idNumber;

	@ApiModelProperty(value = "住址")
    private String address;

	@ApiModelProperty(value = "签发机关")
    private String signOrganization;

	@ApiModelProperty(value = "有效起始日期")
    private String beginDate;

	@ApiModelProperty(value = "有效到期日期")
    private String endDate;

	@ApiModelProperty(value = "身份证人头照")
    private String idCardHeadImg;

	@ApiModelProperty(value = "身份验证时间")
    private String verifyTime;

	@ApiModelProperty(value = "身份验证结果(0:未通过验证，1:通过验证)")
    private Integer verifyResult;
	
	@ApiModelProperty(value = "身份验证结果Str")
	private String verifyResultStr;
   
    public void setSex(Integer sex) {
    	this.sex=sex;
    	this.sexStr= sex==null ? null : UserSexEnum.getName(sex);
    }
    
    public void setVerifyResult(Integer verifyResult) {
    	this.verifyResult=verifyResult;
    	this.verifyResultStr= verifyResult == null ? null : VerifyResultEnum.getName(verifyResult);
    }
}
